package lucky.xiong.certifacte.加解密;

public class RandomStr {
    private static String generateRandomStr(Integer len) {
        char[] charArray = "1234567890".toCharArray();
        int size = len;
        char[] randomArray = new char[size];
        for (int i = 0; i < size; i++) {
            randomArray[i] = charArray[(int) ((Math.random() * 10000) % charArray.length)];
        }
        return new String(randomArray);
    }
}
